//
//  CYOAuthViewController.swift
//  CYWeibo
//
//  Created by 媛 on 16/5/29.
//  Copyright © 2016年 yuan. All rights reserved.
//

import UIKit

class CYOAuthViewController: UIViewController {

    override func loadView() {
        //在loadView阶段，将根视图替换为webView，就不用设置frame
        view = UIWebView()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setNavBar()
    }

    private func setNavBar() {
    
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", target: self, action: #selector(CYOAuthViewController.closeBtnClick))
    }
    
    //关闭按钮的点击事件
    func closeBtnClick() {
        dismissViewControllerAnimated(true, completion: nil)
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
